{% extends "base.html" %}


{% block title %}
职员管理
{% endblock %}

{% block label %}
职员管理
{% endblock %}

{% block contenter %}
<div class="row">
    <div class="col-lg-8">
        {% for dep in dep_list %}
        <a class="btn btn-default" href="/OA/person_info/{{ dep.id }}/">{{ dep.d_name }}</a>
        {% endfor %}
    </div>
    <form role="form" class="col-lg-3" method="get">
        <div class="form-group input-group">
            <input type="text" name="person_username" class="form-control" placeholder="输入要搜索的职员的名字"
                   value="">
            <span class="input-group-btn">
                <button class="btn btn-default" type="submit">
                    <i class="fa fa-search"></i>
                </button>
            </span>
        </div>
    </form>
    <div class="col-lg-1">
        <a class="btn btn-default" href="/OA/add_person/">添加</a>
    </div>
</div>
<div class="row">
    <table class="table">
        <thead>
        <tr>
            <th>职员用户名</th>
            <th>职员部门</th>
            <th>职员职位</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for i in per_info %}
        <tr>
            <td>{{ i.nick_name }}</td>
            <td>{{ i.per_department.d_name }}</td>
            <td>{{ i.per_position.p_name }}</td>
            <td>
                <a class="btn btn-default" href="/OA/detail_person/{{ i.id }}/">详情</a>
                <a class="btn btn-default" href="/OA/edit_person/{{ i.id }}/">编辑</a>
                <a class="btn btn-default" href="/OA/del_perinfo/{{ i.id }}/">删除</a>
            </td>
        </tr>
        {% endfor %}

        </tbody>
        <tfoot>
        <tr>
            <td colspan="4">
                <ul class="pagination">
                    <li class="active"><a href="#" methods="GET">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                </ul>
            </td>
        </tr>
        </tfoot>
    </table>
</div>
{% endblock %}